# Locate the path to the xxd tool
find_program(XXD_EXECUTABLE NAMES "xxd" "xxd.exe")
mark_as_advanced(XXD_EXECUTABLE)

if(TARGET mkcsmapper AND TARGET mkesdb)
  ADD_CUSTOM_TARGET(
    oficonv_data_files
      # convert the ASCII ".src" files into binary ".mps" files
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/CP/CP936EXT%UCS.mps\"                 \"${oficonv_SOURCE_DIR}/datasrc/csmapper/CP/CP936EXT%UCS.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/CP/UCS%CP936EXT.mps\"                 \"${oficonv_SOURCE_DIR}/datasrc/csmapper/CP/UCS%CP936EXT.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/GB/GB18030%UCS@BMP.mps\"              \"${oficonv_SOURCE_DIR}/datasrc/csmapper/GB/GB18030%UCS@BMP.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/GB/GB2312%UCS.mps\"                   \"${oficonv_SOURCE_DIR}/datasrc/csmapper/GB/GB2312%UCS.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/GB/GB2312EXT%UCS.mps\"                \"${oficonv_SOURCE_DIR}/datasrc/csmapper/GB/GB2312EXT%UCS.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/GB/GB2312GBK%UCS.mps\"                \"${oficonv_SOURCE_DIR}/datasrc/csmapper/GB/GB2312GBK%UCS.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/GB/GB2312UDA1%UCS.mps\"               \"${oficonv_SOURCE_DIR}/datasrc/csmapper/GB/GB2312UDA1%UCS.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/GB/GB2312UDA2%UCS.mps\"               \"${oficonv_SOURCE_DIR}/datasrc/csmapper/GB/GB2312UDA2%UCS.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/GB/GBKEXT%UCS.mps\"                   \"${oficonv_SOURCE_DIR}/datasrc/csmapper/GB/GBKEXT%UCS.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/GB/GBKUDA%UCS.mps\"                   \"${oficonv_SOURCE_DIR}/datasrc/csmapper/GB/GBKUDA%UCS.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/GB/UCS%GB2312.mps\"                   \"${oficonv_SOURCE_DIR}/datasrc/csmapper/GB/UCS%GB2312.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/GB/UCS%GB2312EXT.mps\"                \"${oficonv_SOURCE_DIR}/datasrc/csmapper/GB/UCS%GB2312EXT.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/GB/UCS%GB2312UDA1.mps\"               \"${oficonv_SOURCE_DIR}/datasrc/csmapper/GB/UCS%GB2312UDA1.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/GB/UCS%GB2312UDA2.mps\"               \"${oficonv_SOURCE_DIR}/datasrc/csmapper/GB/UCS%GB2312UDA2.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/GB/UCS%GBKEXT.mps\"                   \"${oficonv_SOURCE_DIR}/datasrc/csmapper/GB/UCS%GBKEXT.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/GB/UCS%GBKUDA.mps\"                   \"${oficonv_SOURCE_DIR}/datasrc/csmapper/GB/UCS%GBKUDA.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/GB/UCS@BMP%GB18030.mps\"              \"${oficonv_SOURCE_DIR}/datasrc/csmapper/GB/UCS@BMP%GB18030.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/ISO-8859/ISO-8859-2%UCS.mps\"         \"${oficonv_SOURCE_DIR}/datasrc/csmapper/ISO-8859/ISO-8859-2%UCS.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/ISO-8859/ISO-8859-3%UCS.mps\"         \"${oficonv_SOURCE_DIR}/datasrc/csmapper/ISO-8859/ISO-8859-3%UCS.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/ISO-8859/ISO-8859-4%UCS.mps\"         \"${oficonv_SOURCE_DIR}/datasrc/csmapper/ISO-8859/ISO-8859-4%UCS.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/ISO-8859/ISO-8859-5%UCS.mps\"         \"${oficonv_SOURCE_DIR}/datasrc/csmapper/ISO-8859/ISO-8859-5%UCS.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/ISO-8859/ISO-8859-6%UCS.mps\"         \"${oficonv_SOURCE_DIR}/datasrc/csmapper/ISO-8859/ISO-8859-6%UCS.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/ISO-8859/ISO-8859-7%UCS.mps\"         \"${oficonv_SOURCE_DIR}/datasrc/csmapper/ISO-8859/ISO-8859-7%UCS.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/ISO-8859/ISO-8859-8%UCS.mps\"         \"${oficonv_SOURCE_DIR}/datasrc/csmapper/ISO-8859/ISO-8859-8%UCS.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/ISO-8859/ISO-8859-9%UCS.mps\"         \"${oficonv_SOURCE_DIR}/datasrc/csmapper/ISO-8859/ISO-8859-9%UCS.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/ISO-8859/ISO-8859-11%UCS.mps\"        \"${oficonv_SOURCE_DIR}/datasrc/csmapper/ISO-8859/ISO-8859-11%UCS.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/ISO-8859/ISO-8859-15%UCS.mps\"        \"${oficonv_SOURCE_DIR}/datasrc/csmapper/ISO-8859/ISO-8859-15%UCS.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/ISO-8859/UCS%ISO-8859-2.mps\"         \"${oficonv_SOURCE_DIR}/datasrc/csmapper/ISO-8859/UCS%ISO-8859-2.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/ISO-8859/UCS%ISO-8859-3.mps\"         \"${oficonv_SOURCE_DIR}/datasrc/csmapper/ISO-8859/UCS%ISO-8859-3.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/ISO-8859/UCS%ISO-8859-4.mps\"         \"${oficonv_SOURCE_DIR}/datasrc/csmapper/ISO-8859/UCS%ISO-8859-4.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/ISO-8859/UCS%ISO-8859-5.mps\"         \"${oficonv_SOURCE_DIR}/datasrc/csmapper/ISO-8859/UCS%ISO-8859-5.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/ISO-8859/UCS%ISO-8859-6.mps\"         \"${oficonv_SOURCE_DIR}/datasrc/csmapper/ISO-8859/UCS%ISO-8859-6.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/ISO-8859/UCS%ISO-8859-7.mps\"         \"${oficonv_SOURCE_DIR}/datasrc/csmapper/ISO-8859/UCS%ISO-8859-7.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/ISO-8859/UCS%ISO-8859-8.mps\"         \"${oficonv_SOURCE_DIR}/datasrc/csmapper/ISO-8859/UCS%ISO-8859-8.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/ISO-8859/UCS%ISO-8859-9.mps\"         \"${oficonv_SOURCE_DIR}/datasrc/csmapper/ISO-8859/UCS%ISO-8859-9.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/ISO-8859/UCS%ISO-8859-11.mps\"        \"${oficonv_SOURCE_DIR}/datasrc/csmapper/ISO-8859/UCS%ISO-8859-11.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/ISO-8859/UCS%ISO-8859-15.mps\"        \"${oficonv_SOURCE_DIR}/datasrc/csmapper/ISO-8859/UCS%ISO-8859-15.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/JIS/JISX0201-KANA%UCS.mps\"           \"${oficonv_SOURCE_DIR}/datasrc/csmapper/JIS/JISX0201-KANA%UCS.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/JIS/JISX0208@1990%UCS.mps\"           \"${oficonv_SOURCE_DIR}/datasrc/csmapper/JIS/JISX0208@1990%UCS.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/JIS/JISX0212%UCS.mps\"                \"${oficonv_SOURCE_DIR}/datasrc/csmapper/JIS/JISX0212%UCS.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/JIS/UCS%JISX0201-KANA.mps\"           \"${oficonv_SOURCE_DIR}/datasrc/csmapper/JIS/UCS%JISX0201-KANA.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/JIS/UCS%JISX0208@1990.mps\"           \"${oficonv_SOURCE_DIR}/datasrc/csmapper/JIS/UCS%JISX0208@1990.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/JIS/UCS%JISX0212.mps\"                \"${oficonv_SOURCE_DIR}/datasrc/csmapper/JIS/UCS%JISX0212.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/KS/KSC5601HANGUL%UCS.mps\"            \"${oficonv_SOURCE_DIR}/datasrc/csmapper/KS/KSC5601HANGUL%UCS.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/KS/KSC5601HANJA%UCS.mps\"             \"${oficonv_SOURCE_DIR}/datasrc/csmapper/KS/KSC5601HANJA%UCS.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/KS/UCS%KSC5601HANGUL.mps\"            \"${oficonv_SOURCE_DIR}/datasrc/csmapper/KS/UCS%KSC5601HANGUL.src\"
      COMMAND $<TARGET_FILE:mkcsmapper> -o \"${oficonv_SOURCE_DIR}/data/csmapper/KS/UCS%KSC5601HANJA.mps\"             \"${oficonv_SOURCE_DIR}/datasrc/csmapper/KS/UCS%KSC5601HANJA.src\"

      # copy the ".646" text files, these remain as is
      COMMAND  ${CMAKE_COMMAND} -E copy    \"${oficonv_SOURCE_DIR}/datasrc/csmapper/ISO646/ISO646-JP%UCS.646\"         \"${oficonv_SOURCE_DIR}/data/csmapper/ISO646/ISO646-JP%UCS.646\"
      COMMAND  ${CMAKE_COMMAND} -E copy    \"${oficonv_SOURCE_DIR}/datasrc/csmapper/ISO646/ISO646-US%UCS.646\"         \"${oficonv_SOURCE_DIR}/data/csmapper/ISO646/ISO646-US%UCS.646\"

      # copy the text version of mapper.dir
      COMMAND  ${CMAKE_COMMAND} -E copy    \"${oficonv_SOURCE_DIR}/datasrc/csmapper/mapper.dir\"                       \"${oficonv_SOURCE_DIR}/data/csmapper/mapper.dir\"

      # create the binary versions of mapper.dir and charset.pivot
      COMMAND $<TARGET_FILE:mkcsmapper> -m -o \"${oficonv_SOURCE_DIR}/data/csmapper/mapper.dir.db\"                    \"${oficonv_SOURCE_DIR}/data/csmapper/mapper.dir\"
      COMMAND $<TARGET_FILE:mkcsmapper> -p -o \"${oficonv_SOURCE_DIR}/data/csmapper/charset.pivot.pvdb\"               \"${oficonv_SOURCE_DIR}/datasrc/csmapper/charset.pivot\"

      # convert the EUC source files
      COMMAND  $<TARGET_FILE:mkesdb> -o \"${oficonv_SOURCE_DIR}/data/esdb/EUC/EUC-CN.esdb\"       \"${oficonv_SOURCE_DIR}/datasrc/esdb/EUC/EUC-CN.src\"
      COMMAND  $<TARGET_FILE:mkesdb> -o \"${oficonv_SOURCE_DIR}/data/esdb/EUC/EUC-KR.esdb\"       \"${oficonv_SOURCE_DIR}/datasrc/esdb/EUC/EUC-KR.src\"

      # convert the GB source files
      COMMAND  $<TARGET_FILE:mkesdb> -o \"${oficonv_SOURCE_DIR}/data/esdb/GB/GB18030.esdb\"       \"${oficonv_SOURCE_DIR}/datasrc/esdb/GB/GB18030.src\"
      COMMAND  $<TARGET_FILE:mkesdb> -o \"${oficonv_SOURCE_DIR}/data/esdb/GB/GBK.esdb\"           \"${oficonv_SOURCE_DIR}/datasrc/esdb/GB/GBK.src\"

      # create those ISO-8859 source files that are generated from a common template
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_SOURCE_DIR}/datasrc/esdb/ISO-8859/ISO-8859.src\"" "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/ISO-8859-1.src\""   "-DREGEX=ISO-8859-x" "-DREPLACE=ISO-8859-1"   -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_SOURCE_DIR}/datasrc/esdb/ISO-8859/ISO-8859.src\"" "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/ISO-8859-2.src\""   "-DREGEX=ISO-8859-x" "-DREPLACE=ISO-8859-2"   -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_SOURCE_DIR}/datasrc/esdb/ISO-8859/ISO-8859.src\"" "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/ISO-8859-3.src\""   "-DREGEX=ISO-8859-x" "-DREPLACE=ISO-8859-3"   -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_SOURCE_DIR}/datasrc/esdb/ISO-8859/ISO-8859.src\"" "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/ISO-8859-4.src\""   "-DREGEX=ISO-8859-x" "-DREPLACE=ISO-8859-4"   -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_SOURCE_DIR}/datasrc/esdb/ISO-8859/ISO-8859.src\"" "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/ISO-8859-5.src\""   "-DREGEX=ISO-8859-x" "-DREPLACE=ISO-8859-5"   -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_SOURCE_DIR}/datasrc/esdb/ISO-8859/ISO-8859.src\"" "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/ISO-8859-6.src\""   "-DREGEX=ISO-8859-x" "-DREPLACE=ISO-8859-6"   -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_SOURCE_DIR}/datasrc/esdb/ISO-8859/ISO-8859.src\"" "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/ISO-8859-7.src\""   "-DREGEX=ISO-8859-x" "-DREPLACE=ISO-8859-7"   -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_SOURCE_DIR}/datasrc/esdb/ISO-8859/ISO-8859.src\"" "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/ISO-8859-8.src\""   "-DREGEX=ISO-8859-x" "-DREPLACE=ISO-8859-8"   -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_SOURCE_DIR}/datasrc/esdb/ISO-8859/ISO-8859.src\"" "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/ISO-8859-9.src\""   "-DREGEX=ISO-8859-x" "-DREPLACE=ISO-8859-9"   -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_SOURCE_DIR}/datasrc/esdb/ISO-8859/ISO-8859.src\"" "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/ISO-8859-11.src\""  "-DREGEX=ISO-8859-x" "-DREPLACE=ISO-8859-11"  -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_SOURCE_DIR}/datasrc/esdb/ISO-8859/ISO-8859.src\"" "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/ISO-8859-15.src\""  "-DREGEX=ISO-8859-x" "-DREPLACE=ISO-8859-15"  -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"

      # convert the generated src files to esdb files
      COMMAND  $<TARGET_FILE:mkesdb> -o \"${oficonv_SOURCE_DIR}/data/esdb/ISO-8859/ISO-8859-1.esdb\"      \"${oficonv_BINARY_DIR}/datasrc/ISO-8859-1.src\"
      COMMAND  $<TARGET_FILE:mkesdb> -o \"${oficonv_SOURCE_DIR}/data/esdb/ISO-8859/ISO-8859-2.esdb\"      \"${oficonv_BINARY_DIR}/datasrc/ISO-8859-2.src\"
      COMMAND  $<TARGET_FILE:mkesdb> -o \"${oficonv_SOURCE_DIR}/data/esdb/ISO-8859/ISO-8859-3.esdb\"      \"${oficonv_BINARY_DIR}/datasrc/ISO-8859-3.src\"
      COMMAND  $<TARGET_FILE:mkesdb> -o \"${oficonv_SOURCE_DIR}/data/esdb/ISO-8859/ISO-8859-4.esdb\"      \"${oficonv_BINARY_DIR}/datasrc/ISO-8859-4.src\"
      COMMAND  $<TARGET_FILE:mkesdb> -o \"${oficonv_SOURCE_DIR}/data/esdb/ISO-8859/ISO-8859-5.esdb\"      \"${oficonv_BINARY_DIR}/datasrc/ISO-8859-5.src\"
      COMMAND  $<TARGET_FILE:mkesdb> -o \"${oficonv_SOURCE_DIR}/data/esdb/ISO-8859/ISO-8859-6.esdb\"      \"${oficonv_BINARY_DIR}/datasrc/ISO-8859-6.src\"
      COMMAND  $<TARGET_FILE:mkesdb> -o \"${oficonv_SOURCE_DIR}/data/esdb/ISO-8859/ISO-8859-7.esdb\"      \"${oficonv_BINARY_DIR}/datasrc/ISO-8859-7.src\"
      COMMAND  $<TARGET_FILE:mkesdb> -o \"${oficonv_SOURCE_DIR}/data/esdb/ISO-8859/ISO-8859-8.esdb\"      \"${oficonv_BINARY_DIR}/datasrc/ISO-8859-8.src\"
      COMMAND  $<TARGET_FILE:mkesdb> -o \"${oficonv_SOURCE_DIR}/data/esdb/ISO-8859/ISO-8859-9.esdb\"      \"${oficonv_BINARY_DIR}/datasrc/ISO-8859-9.src\"
      COMMAND  $<TARGET_FILE:mkesdb> -o \"${oficonv_SOURCE_DIR}/data/esdb/ISO-8859/ISO-8859-11.esdb\"     \"${oficonv_BINARY_DIR}/datasrc/ISO-8859-11.src\"
      COMMAND  $<TARGET_FILE:mkesdb> -o \"${oficonv_SOURCE_DIR}/data/esdb/ISO-8859/ISO-8859-15.esdb\"     \"${oficonv_BINARY_DIR}/datasrc/ISO-8859-15.src\"

      # create those ISO646 source files that are generated from a common template
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_SOURCE_DIR}/datasrc/esdb/ISO646/ISO646.src\"" "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/ISO646-US.src\""           "-DREGEX=ISO646-x" "-DREPLACE=ISO646-US"          -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"

      # convert the generated src files to esdb files
      COMMAND  $<TARGET_FILE:mkesdb> -o \"${oficonv_SOURCE_DIR}/data/esdb/ISO646/ISO646-US.esdb\"          \"${oficonv_BINARY_DIR}/datasrc/ISO646-US.src\"

      # convert the MISC source files
      COMMAND  $<TARGET_FILE:mkesdb> -o \"${oficonv_SOURCE_DIR}/data/esdb/MISC/JISX0201-KANA.esdb\"  \"${oficonv_SOURCE_DIR}/datasrc/esdb/MISC/JISX0201-KANA.src\"
      COMMAND  $<TARGET_FILE:mkesdb> -o \"${oficonv_SOURCE_DIR}/data/esdb/MISC/JISX0208@1990.esdb\"  \"${oficonv_SOURCE_DIR}/datasrc/esdb/MISC/JISX0208@1990.src\"
      COMMAND  $<TARGET_FILE:mkesdb> -o \"${oficonv_SOURCE_DIR}/data/esdb/MISC/Shift_JIS.esdb\"      \"${oficonv_SOURCE_DIR}/datasrc/esdb/MISC/Shift_JIS.src\"
      COMMAND  $<TARGET_FILE:mkesdb> -o \"${oficonv_SOURCE_DIR}/data/esdb/MISC/JISX0212.esdb\"       \"${oficonv_SOURCE_DIR}/datasrc/esdb/MISC/JISX0212.src\"

      # create those UTF source files that are generated from a common template
      # replace "UTF-mod" in the template, write to temporary file
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_SOURCE_DIR}/datasrc/esdb/UTF/UTF.src\"" "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/temp01.src\""          "-DREGEX=UTF-mod" "-DREPLACE=UTF1632"              -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_SOURCE_DIR}/datasrc/esdb/UTF/UTF.src\"" "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/temp03.src\""          "-DREGEX=UTF-mod" "-DREPLACE=UTF8"                 -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      # replace "UTF-x" in the temporary template, write to temporary file
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_BINARY_DIR}/datasrc/temp01.src\""       "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/temp04.src\""          "-DREGEX=UTF-x"   "-DREPLACE=UTF-16-INTERNAL"      -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_BINARY_DIR}/datasrc/temp01.src\""       "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/temp05.src\""          "-DREGEX=UTF-x"   "-DREPLACE=UTF-16-SWAPPED"       -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_BINARY_DIR}/datasrc/temp01.src\""       "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/temp06.src\""          "-DREGEX=UTF-x"   "-DREPLACE=UTF-16"               -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_BINARY_DIR}/datasrc/temp01.src\""       "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/temp07.src\""          "-DREGEX=UTF-x"   "-DREPLACE=UTF-16BE"             -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_BINARY_DIR}/datasrc/temp01.src\""       "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/temp08.src\""          "-DREGEX=UTF-x"   "-DREPLACE=UTF-16LE"             -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_BINARY_DIR}/datasrc/temp01.src\""       "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/temp09.src\""          "-DREGEX=UTF-x"   "-DREPLACE=UTF-32-INTERNAL"      -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_BINARY_DIR}/datasrc/temp01.src\""       "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/temp10.src\""          "-DREGEX=UTF-x"   "-DREPLACE=UTF-32-SWAPPED"       -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_BINARY_DIR}/datasrc/temp01.src\""       "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/temp11.src\""          "-DREGEX=UTF-x"   "-DREPLACE=UTF-32"               -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_BINARY_DIR}/datasrc/temp01.src\""       "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/temp12.src\""          "-DREGEX=UTF-x"   "-DREPLACE=UTF-32BE"             -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_BINARY_DIR}/datasrc/temp01.src\""       "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/temp13.src\""          "-DREGEX=UTF-x"   "-DREPLACE=UTF-32LE"             -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_BINARY_DIR}/datasrc/temp03.src\""       "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/temp15.src\""          "-DREGEX=UTF-x"   "-DREPLACE=UTF-8"                -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      # replace "UTF-var" in the temporary template, write to source file
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_BINARY_DIR}/datasrc/temp04.src\""       "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/UTF-16-INTERNAL.src\"" "-DREGEX=UTF-var" "-DREPLACE=utf16,internal,force" -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_BINARY_DIR}/datasrc/temp05.src\""       "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/UTF-16-SWAPPED.src\""  "-DREGEX=UTF-var" "-DREPLACE=utf16,swapped,force"  -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_BINARY_DIR}/datasrc/temp06.src\""       "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/UTF-16.src\""          "-DREGEX=UTF-var" "-DREPLACE=utf16"                -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_BINARY_DIR}/datasrc/temp07.src\""       "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/UTF-16BE.src\""        "-DREGEX=UTF-var" "-DREPLACE=utf16,big,force"      -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_BINARY_DIR}/datasrc/temp08.src\""       "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/UTF-16LE.src\""        "-DREGEX=UTF-var" "-DREPLACE=utf16,little,force"   -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_BINARY_DIR}/datasrc/temp09.src\""       "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/UTF-32-INTERNAL.src\"" "-DREGEX=UTF-var" "-DREPLACE=utf32,internal,force" -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_BINARY_DIR}/datasrc/temp10.src\""       "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/UTF-32-SWAPPED.src\""  "-DREGEX=UTF-var" "-DREPLACE=utf32,swapped,force"  -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_BINARY_DIR}/datasrc/temp11.src\""       "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/UTF-32.src\""          "-DREGEX=UTF-var" "-DREPLACE=utf32"                -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_BINARY_DIR}/datasrc/temp12.src\""       "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/UTF-32BE.src\""        "-DREGEX=UTF-var" "-DREPLACE=utf32,big,force"      -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_BINARY_DIR}/datasrc/temp13.src\""       "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/UTF-32LE.src\""        "-DREGEX=UTF-var" "-DREPLACE=utf32,little,force"   -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"
      COMMAND  ${CMAKE_COMMAND} "-DINFILE=\"${oficonv_BINARY_DIR}/datasrc/temp15.src\""       "-DOUTFILE=\"${oficonv_BINARY_DIR}/datasrc/UTF-8.src\""           "-DREGEX=UTF-var" "-DREPLACE=utf8"                 -P \"${oficonv_SOURCE_DIR}/datasrc/replace.cmake\"

      # convert the generated src files to esdb files
      COMMAND  $<TARGET_FILE:mkesdb> -o \"${oficonv_SOURCE_DIR}/data/esdb/UTF/UTF-16-INTERNAL.esdb\"  \"${oficonv_BINARY_DIR}/datasrc/UTF-16-INTERNAL.src\"
      COMMAND  $<TARGET_FILE:mkesdb> -o \"${oficonv_SOURCE_DIR}/data/esdb/UTF/UTF-16-SWAPPED.esdb\"   \"${oficonv_BINARY_DIR}/datasrc/UTF-16-SWAPPED.src\"
      COMMAND  $<TARGET_FILE:mkesdb> -o \"${oficonv_SOURCE_DIR}/data/esdb/UTF/UTF-16.esdb\"           \"${oficonv_BINARY_DIR}/datasrc/UTF-16.src\"
      COMMAND  $<TARGET_FILE:mkesdb> -o \"${oficonv_SOURCE_DIR}/data/esdb/UTF/UTF-16BE.esdb\"         \"${oficonv_BINARY_DIR}/datasrc/UTF-16BE.src\"
      COMMAND  $<TARGET_FILE:mkesdb> -o \"${oficonv_SOURCE_DIR}/data/esdb/UTF/UTF-16LE.esdb\"         \"${oficonv_BINARY_DIR}/datasrc/UTF-16LE.src\"
      COMMAND  $<TARGET_FILE:mkesdb> -o \"${oficonv_SOURCE_DIR}/data/esdb/UTF/UTF-32-INTERNAL.esdb\"  \"${oficonv_BINARY_DIR}/datasrc/UTF-32-INTERNAL.src\"
      COMMAND  $<TARGET_FILE:mkesdb> -o \"${oficonv_SOURCE_DIR}/data/esdb/UTF/UTF-32-SWAPPED.esdb\"   \"${oficonv_BINARY_DIR}/datasrc/UTF-32-SWAPPED.src\"
      COMMAND  $<TARGET_FILE:mkesdb> -o \"${oficonv_SOURCE_DIR}/data/esdb/UTF/UTF-32.esdb\"           \"${oficonv_BINARY_DIR}/datasrc/UTF-32.src\"
      COMMAND  $<TARGET_FILE:mkesdb> -o \"${oficonv_SOURCE_DIR}/data/esdb/UTF/UTF-32BE.esdb\"         \"${oficonv_BINARY_DIR}/datasrc/UTF-32BE.src\"
      COMMAND  $<TARGET_FILE:mkesdb> -o \"${oficonv_SOURCE_DIR}/data/esdb/UTF/UTF-32LE.esdb\"         \"${oficonv_BINARY_DIR}/datasrc/UTF-32LE.src\"
      COMMAND  $<TARGET_FILE:mkesdb> -o \"${oficonv_SOURCE_DIR}/data/esdb/UTF/UTF-8.esdb\"            \"${oficonv_BINARY_DIR}/datasrc/UTF-8.src\"

      # create the binary versions of esdb.dir and esdb.alias
      COMMAND $<TARGET_FILE:mkesdb> -m -o \"${oficonv_SOURCE_DIR}/data/esdb/esdb.dir.db\"                    \"${oficonv_SOURCE_DIR}/datasrc/esdb/esdb.dir\"
      COMMAND $<TARGET_FILE:mkesdb> -m -o \"${oficonv_SOURCE_DIR}/data/esdb/esdb.alias.db\"               \"${oficonv_SOURCE_DIR}/datasrc/esdb/esdb.alias\"

      COMMENT "Creating oficonv data files from source"
  )
endif()

if(XXD_EXECUTABLE)
  ADD_CUSTOM_TARGET(
    oficonv_data_library
      # convert the binary csmapper and esdb files into C++ header files
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/mapper.dir.db\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_mapper_dir_db.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/ISO-8859/UCS%ISO-8859-9.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_iso_8859_ucs_iso_8859_9_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/ISO-8859/ISO-8859-8%UCS.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_iso_8859_iso_8859_8_ucs_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/ISO-8859/UCS%ISO-8859-3.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_iso_8859_ucs_iso_8859_3_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/ISO-8859/ISO-8859-5%UCS.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_iso_8859_iso_8859_5_ucs_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/ISO-8859/UCS%ISO-8859-5.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_iso_8859_ucs_iso_8859_5_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/ISO-8859/ISO-8859-11%UCS.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_iso_8859_iso_8859_11_ucs_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/ISO-8859/ISO-8859-9%UCS.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_iso_8859_iso_8859_9_ucs_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/ISO-8859/ISO-8859-4%UCS.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_iso_8859_iso_8859_4_ucs_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/ISO-8859/ISO-8859-7%UCS.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_iso_8859_iso_8859_7_ucs_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/ISO-8859/UCS%ISO-8859-6.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_iso_8859_ucs_iso_8859_6_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/ISO-8859/ISO-8859-6%UCS.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_iso_8859_iso_8859_6_ucs_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/ISO-8859/UCS%ISO-8859-15.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_iso_8859_ucs_iso_8859_15_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/ISO-8859/ISO-8859-3%UCS.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_iso_8859_iso_8859_3_ucs_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/ISO-8859/UCS%ISO-8859-11.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_iso_8859_ucs_iso_8859_11_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/ISO-8859/ISO-8859-15%UCS.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_iso_8859_iso_8859_15_ucs_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/ISO-8859/UCS%ISO-8859-2.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_iso_8859_ucs_iso_8859_2_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/ISO-8859/UCS%ISO-8859-8.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_iso_8859_ucs_iso_8859_8_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/ISO-8859/UCS%ISO-8859-4.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_iso_8859_ucs_iso_8859_4_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/ISO-8859/UCS%ISO-8859-7.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_iso_8859_ucs_iso_8859_7_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/ISO-8859/ISO-8859-2%UCS.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_iso_8859_iso_8859_2_ucs_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/CP/UCS%CP936EXT.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_cp_ucs_cp936ext_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/CP/CP936EXT%UCS.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_cp_cp936ext_ucs_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/mapper.dir\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_mapper_dir.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/ISO646/ISO646-JP%UCS.646\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_iso646_iso646_jp_ucs_646.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/ISO646/ISO646-US%UCS.646\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_iso646_iso646_us_ucs_646.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/JIS/JISX0212%UCS.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_jis_jisx0212_ucs_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/JIS/UCS%JISX0208@1990.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_jis_ucs_jisx0208@1990_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/JIS/UCS%JISX0201-KANA.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_jis_ucs_jisx0201_kana_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/JIS/JISX0208@1990%UCS.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_jis_jisx0208@1990_ucs_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/JIS/JISX0201-KANA%UCS.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_jis_jisx0201_kana_ucs_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/JIS/UCS%JISX0212.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_jis_ucs_jisx0212_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/charset.pivot.pvdb\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_charset_pivot_pvdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/GB/GBKUDA%UCS.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_gb_gbkuda_ucs_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/GB/GB2312EXT%UCS.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_gb_gb2312ext_ucs_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/GB/UCS%GB2312.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_gb_ucs_gb2312_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/GB/GB2312%UCS.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_gb_gb2312_ucs_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/GB/GB2312UDA1%UCS.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_gb_gb2312uda1_ucs_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/GB/UCS@BMP%GB18030.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_gb_ucs@bmp_gb18030_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/GB/UCS%GBKEXT.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_gb_ucs_gbkext_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/GB/UCS%GB2312UDA1.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_gb_ucs_gb2312uda1_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/GB/GB2312UDA2%UCS.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_gb_gb2312uda2_ucs_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/GB/UCS%GB2312EXT.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_gb_ucs_gb2312ext_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/GB/GB2312GBK%UCS.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_gb_gb2312gbk_ucs_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/GB/UCS%GBKUDA.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_gb_ucs_gbkuda_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/GB/GB18030%UCS@BMP.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_gb_gb18030_ucs@bmp_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/GB/GBKEXT%UCS.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_gb_gbkext_ucs_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/GB/UCS%GB2312UDA2.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_gb_ucs_gb2312uda2_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/KS/KSC5601HANGUL%UCS.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_ks_ksc5601hangul_ucs_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/KS/UCS%KSC5601HANJA.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_ks_ucs_ksc5601hanja_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/KS/KSC5601HANJA%UCS.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_ks_ksc5601hanja_ucs_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"csmapper/KS/UCS%KSC5601HANGUL.mps\" \"${oficonv_SOURCE_DIR}/libsrc/csmapper_ks_ucs_ksc5601hangul_mps.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/EUC/EUC-KR.esdb\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_euc_euc_kr_esdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/EUC/EUC-CN.esdb\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_euc_euc_cn_esdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/ISO-8859/ISO-8859-8.esdb\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_iso_8859_iso_8859_8_esdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/ISO-8859/ISO-8859-4.esdb\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_iso_8859_iso_8859_4_esdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/ISO-8859/ISO-8859-11.esdb\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_iso_8859_iso_8859_11_esdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/ISO-8859/ISO-8859-3.esdb\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_iso_8859_iso_8859_3_esdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/ISO-8859/ISO-8859-15.esdb\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_iso_8859_iso_8859_15_esdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/ISO-8859/ISO-8859-5.esdb\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_iso_8859_iso_8859_5_esdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/ISO-8859/ISO-8859-6.esdb\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_iso_8859_iso_8859_6_esdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/ISO-8859/ISO-8859-2.esdb\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_iso_8859_iso_8859_2_esdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/ISO-8859/ISO-8859-9.esdb\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_iso_8859_iso_8859_9_esdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/ISO-8859/ISO-8859-1.esdb\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_iso_8859_iso_8859_1_esdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/ISO-8859/ISO-8859-7.esdb\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_iso_8859_iso_8859_7_esdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/MISC/JISX0208@1990.esdb\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_misc_jisx0208@1990_esdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/MISC/JISX0212.esdb\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_misc_jisx0212_esdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/MISC/Shift_JIS.esdb\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_misc_shift_jis_esdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/MISC/JISX0201-KANA.esdb\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_misc_jisx0201_kana_esdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/esdb.alias.db\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_esdb_alias_db.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/UTF/UTF-16-INTERNAL.esdb\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_utf_utf_16_internal_esdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/UTF/UTF-16BE.esdb\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_utf_utf_16be_esdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/UTF/UTF-16.esdb\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_utf_utf_16_esdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/UTF/UTF-32-SWAPPED.esdb\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_utf_utf_32_swapped_esdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/UTF/UTF-32-INTERNAL.esdb\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_utf_utf_32_internal_esdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/UTF/UTF-32LE.esdb\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_utf_utf_32le_esdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/UTF/UTF-16-SWAPPED.esdb\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_utf_utf_16_swapped_esdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/UTF/UTF-8.esdb\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_utf_utf_8_esdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/UTF/UTF-32BE.esdb\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_utf_utf_32be_esdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/UTF/UTF-16LE.esdb\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_utf_utf_16le_esdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/UTF/UTF-32.esdb\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_utf_utf_32_esdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/ISO646/ISO646-US.esdb\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_iso646_iso646_us_esdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/esdb.dir.db\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_esdb_dir_db.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/GB/GB18030.esdb\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_gb_gb18030_esdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
      COMMAND ${XXD_EXECUTABLE} -i \"esdb/GB/GBK.esdb\" \"${oficonv_SOURCE_DIR}/libsrc/esdb_gb_gbk_esdb.h\" WORKING_DIRECTORY "${oficonv_SOURCE_DIR}/data/"
)
endif()
